#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
    string str = "";
    getline(cin, str);
    vector<string> res;
    if (str.size() == 0 || str[0] == ' ')
        return 0;
    string tmp;
    for (int i = 0; i < str.size(); ++i)
    {
        if(str[i] == '"')
        {
            while(str[++i] != '"')
            {
                tmp += str[i];
            }
            res.push_back(tmp);
            tmp = "";
            i++; // 跳过一个双引号后的空格
        }
        else if (str[i] != ' ')
        {
            tmp += str[i];
        }
        else
        {
            res.push_back(tmp);
            tmp = "";
        }
    }
    if(!tmp.empty())
        res.push_back(tmp);
    cout << res.size() << endl;;
    for (auto& e : res)
    {
        cout << e << endl;
    }
    return 0;
}